package com.zl.component;

import com.zl.User;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

@Component
public class Users {
    @Bean
    public User user1() {
        User user = new User();
        user.setAge(18);
        user.setName("李四");
        return user;

    }

    @Bean
    public User user2() {
        User user = new User();
        user.setAge(12);
        user.setName("张三");
        return user;
    }
}
